package com.itao.mybatis.mapper;

import com.itao.mybatis.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * @author sjt
 * @Date 2024/12/19 10:48
 */

public interface UserMapper {

    @Insert("insert into user(user_name, age) values(#{userName}, #{age}) ")
    int insertUser(User user);

    @SelectProvider(type = UserMapperProvider.class, method = "selectUser")
    List<User> selectUser(@Param("user") User user);

    @SelectProvider(type = UserMapperProvider.class, method = "selectUser1")
    List<User> selectUser1(User user);
}
